using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class ApagingMap : EntityTypeConfiguration<Apaging>
    {
        public ApagingMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.vendid)
                .IsRequired()
                .HasMaxLength(6);

            this.Property(t => t.File_Primary_Key)
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("Apaging");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.vendid).HasColumnName("vendid");
            this.Property(t => t.LastInvDate).HasColumnName("LastInvDate");
            this.Property(t => t.LastPymtDate).HasColumnName("LastPymtDate");
            this.Property(t => t.LastInvAmtVend).HasColumnName("LastInvAmtVend");
            this.Property(t => t.LastInvAmtLL).HasColumnName("LastInvAmtLL");
            this.Property(t => t.LastInvAmtDol).HasColumnName("LastInvAmtDol");
            this.Property(t => t.BalanceVend).HasColumnName("BalanceVend");
            this.Property(t => t.BalanceLL).HasColumnName("BalanceLL");
            this.Property(t => t.BalanceDol).HasColumnName("BalanceDol");
            this.Property(t => t.CurAmtVend).HasColumnName("CurAmtVend");
            this.Property(t => t.CurAmtLL).HasColumnName("CurAmtLL");
            this.Property(t => t.CurAmtDol).HasColumnName("CurAmtDol");
            this.Property(t => t.OVER30Vend).HasColumnName("OVER30Vend");
            this.Property(t => t.OVER30LL).HasColumnName("OVER30LL");
            this.Property(t => t.OVER30Dol).HasColumnName("OVER30Dol");
            this.Property(t => t.OVER60Vend).HasColumnName("OVER60Vend");
            this.Property(t => t.OVER60LL).HasColumnName("OVER60LL");
            this.Property(t => t.OVER60Dol).HasColumnName("OVER60Dol");
            this.Property(t => t.OVER90Vend).HasColumnName("OVER90Vend");
            this.Property(t => t.OVER90LL).HasColumnName("OVER90LL");
            this.Property(t => t.OVER90Dol).HasColumnName("OVER90Dol");
            this.Property(t => t.File_Primary_Key).HasColumnName("File Primary Key");
        }
    }
}
